index_app.controller("loginCtrl", function ($scope,$http,$routeParams) {

	//用户信息修改页面中保存操作
	$scope.addUser = function(loginUser){
         $http({
			method  : 'POST',
			url     : '/login',
			params    : loginUser,//传递真个对象到后台
			headers : { 'Content-Type': 'application/x-www-form-urlencoded' }  // set the headers so angular passing info as form data (not request payload)
		}).success(function(response) {
			if(response != null){
				alert("登陆成功");
				window.location.href="index";
			} else {
				alert("登陆失败");
			}
		});
	};









})